<!doctype html>
<html>
<head>
<meta charset="utf-8">
</head>
<body onload="f1()">
<script>
window.onload = f2;
function f1(){
    alert('<body onload="f1()">');
}
function f2(){
    alert('window.onload = f2;');
}
</script>
</body>

 
</html>
